<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- pop shift -->
    <script>
        var arr =[1,2,3,4];
        arr.pop();//从末尾删除
        arr.shift();//从头删除
        console.log(arr)
    </script>

    <!-- splice(index,howmany) index,从那个下标开始  howmany 删除多少个 -->
    <script>
        var a=[1,2,3,4,5];
        a.splice(3,1);
        console.log(a);
    </script>
</body>
</html>